/**
 * @file	Path.h
 * @brief	Path is a class used to represented connection between modules.
 *			The coordinate of polygon store the position of path. 
 *			With the information of the coordinate of center line of a path, 
 *			we can generate the path polygon.
 * @author	Shaokp
 * @date	2010-11-24
 * @version	0.1
 */

#ifndef PATH_H
#define PATH_H
#include <string>
#include <vector>
#include "Element.h"

class Path: public Element
{
public:
	Path(std::string name);
	// The vertex vector stores the inflection of center line of path;
	//Path(std::string name, std::vector<Point> &vertexs);

	void setWidth(double width);
	double getWidth() const;
	void setVertexs(std::vector<Point> &vertexs);
	void getVertexs(std::vector<Point> &vertexs, double buffer = 0) const;
	int getType()const {return PATH;}
private:
	std::vector<Point> mVertexs;
	double mWidth;

	struct EndList
	{
		Point mEnd;
		EndList *mNext;
		EndList():mNext(NULL){}
	};
};
#endif
